﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Calculate
    {
        public int a { get; set; }
        public int b { get; set; }

        public Calculate(int a,int b) 
        {
             this.a = a;
            this.b = b;
        }
        public virtual void DisplayResult() 
        {

        }
    }
    class jia : Calculate
    {
        public jia(int a, int b) :base(a,b)
        {
         
        }
        public override void DisplayResult()
        {
            base.DisplayResult();
            Console.WriteLine("{0}+{1}={2}", a, b, a + b);
        }
    }
    class jian : Calculate
    {
        public jian(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            base.DisplayResult();
            Console.WriteLine("{0}-{1}={2}", a, b, a - b);
        }
    }
    class cheng : Calculate
    {
        public cheng(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            base.DisplayResult();
            Console.WriteLine("{0}*{1}={2}", a, b, a * b);
        }
    }
    class chu : Calculate
    {
        public chu(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            base.DisplayResult();
            Console.WriteLine("{0}/{1}={2}",a,b,a/b);
        }
    }
}
